package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.PurchaseList;
import com.atguigu.jxc.vo.PurchaseListAndReturnListVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface PurchaseListDao {

    //保存进货单
    void savePurchaseList(PurchaseList purchaseList);

    //进货单列表展示（可条件查询：单据号模糊、供应商、是否付款和日期区间）
    List<PurchaseList> listSelect(@Param("purchaseNumber") String purchaseNumber,@Param("supplierId") Integer supplierId,
                                  @Param("state") Integer state,@Param("sTime") String sTime,@Param("eTime") String eTime);

    //删除进货单
    void deletePurchaseList(@Param("purchaseListId") Integer purchaseListId);

    //支付结算（修改进货单付款状态） Integer purchaseListId

    void updateState(PurchaseList purchaseList);

    //进货统计（可根据 商品类别、商品编码或名称 条件查询）
    List<PurchaseListAndReturnListVo> count(@Param("sTime") String sTime, @Param("eTime") String eTime, @Param("goodsTypeId") Integer goodsTypeId, @Param("codeOrName") String codeOrName);

    //根据id查询支付状态
    PurchaseList selectById(@Param("purchaseListId") Integer purchaseListId);
}
